package com.ziyun.erp.common.utils;

import io.renren.modules.sys.entity.SysUserEntity;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author guizhao
 * @Description: 用户具类
 * @date 2018-08-0413:27
 */
public class UserUtils {
    private static Logger logger = LoggerFactory.getLogger(UserUtils.class);

    public static SysUserEntity getCurentUser(){
        try {
            return ((SysUserEntity) SecurityUtils.getSubject().getPrincipal());
        }catch (Exception e){
            return null;
        }


    }
}
